import axios from '@/libs/axios.js'
import baseUrl from './index'
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' }

// ICON列表
export const getIconData = (iconDto,query) => {
    return axios({
        url: `${baseUrl}/new-paper/icon/list`,
        method: 'post',
        params:query,
        data:JSON.stringify(iconDto),
        headers: jsonHeaders,
    })
}

//创建icon图标
export const createIcon = (params) => {
    return axios({
        method:'post',
        url:`${baseUrl}/new-paper/icon`,
        data:JSON.stringify(params),
        headers: jsonHeaders,
    })
}

// 修改
export const modifyIcon = (params,id) => {
    return axios({
        url: `${baseUrl}/new-paper/icon/${id}`,
        method: 'put',
        data:JSON.stringify(params),
        headers: jsonHeaders,
    })
}
// 删除
export const delIcon = (id) => {
    return axios({
        url: `${baseUrl}/new-paper/icon/${id}`,
        method: 'delete',
        headers: {
            'content-type':'application/x-www-form-urlencoded'
        },
    })
}